package com.jgdt.demo.core;

import java.io.File;
import java.util.HashSet;

public class ResourceClean {
    public static void main(String args[]){
        File dir=new File("D:\\workspace\\sutong-android\\app-hebei\\src\\main\\res\\drawable-xhdpi");
        HashSet<String> xhdpiList=new HashSet<String>();
        for(File f:dir.listFiles()){
            xhdpiList.add(f.getName());
        }
        dir=new File("D:\\workspace\\sutong-android\\app-hebei\\src\\main\\res\\drawable-hdpi");
        for(File f:dir.listFiles()){
            if(xhdpiList.contains(f.getName())){
                f.delete();
                System.out.println("["+f.isFile()+"]"+f);
            }
        }
        /**
        dir=new File("D:\\workspace\\sutong-android\\app-hebei\\src\\main\\res\\drawable-xxhdpi");
        for(File f:dir.listFiles()){
            if(xhdpiList.contains(f.getName())){
                f.delete();
                System.out.println("["+f.isFile()+"]"+f);
            }
        }
        dir=new File("D:\\workspace\\sutong-android\\app-hebei\\src\\main\\res\\drawable-hdpi");
        HashSet<String> hdpiList=new HashSet<String>();
        for(File f:dir.listFiles()){
            hdpiList.add(f.getName());
        }
        dir=new File("D:\\workspace\\sutong-android\\app-hebei\\src\\main\\res\\drawable-xxhdpi");
        for(File f:dir.listFiles()){
            if(hdpiList.contains(f.getName())){
                f.delete();
                System.out.println("["+f.isFile()+"]"+f);
            }
        }*/
    }
}
